//
//  YHTimeCell.m
//  YunHaiManage
//
//  Created by zhangbolin on 2021/12/22.
//

#import "YHTimeCell.h"
#import "Masonry.h"

@interface YHTimeCell ()

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation YHTimeCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self loadUI];
    }
    return self;
}

- (void)loadDataWithTitle:(NSString *)title {
    self.titleLabel.text = title;
}

- (void)loadUI {
    [self.contentView addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0);
    }];
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont systemFontOfSize:14];
        _titleLabel.textColor = [UIColor purpleColor];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLabel;
}

@end
